home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Commodore Free 9
/
Commodore_Free_Issue_09_2007_Commodore_Computer_Club.d64
/
t.shredz64 1
< prev
next >
Wrap
Text File
|
2023-02-26
|
8KB
|
249 lines
u The Shredz64
Project By Toni Westbrook
PART 1
The Shredz64 project is an attempt to
build an interface to connect the
Playstation Guitar Hero controller
(and any other PS controller) to the
Commodore 64 computer, then create a
Guitar Hero like game on the C64
utilizing the guitar controller.
So far the project has been going
well! As you can see, the interface,
which I call the "PSX64", is 98%
functional (There are some tiny bugs
which don't really impact
functionality on the whole). Not only
are all guitar functions mapped over
successfully, but it works great for
playing C64 games with a normal dual
shock controller. What's more, since
the same DB9 port is used, the PSX64
can be used on the Amiga, Atari and
Sega Master System (All tested except
SMS)..
The Shredz64 game itself is still in
its infancy, but progressing nicely.
Most importantly, my journal of latest
updates can be found on the "News
Updates" page, for those interested. I
don't have a ton of free time, but I'm
very dedicated to this project, so it
will progress, if only just slowly.
Shredz64 News 4/6/07 Lots of very
promising progress tonight (and a few
nights ago). First off, I implemented
code that will read both note data for
fret buttons and music data from SID
files off of floppy disk. I also wrote
some quick utilities on my Linux box
to generate note files for testing. So
all the static values are out of the
program and its reading off files now.
More importantly though, I implemented
a good portion of the SID -> Shredz64
converter tonight - this sounds much
fancier than it actually is. The issue
is normal SID files are big blocks of
6502 machine code that have been
ripped (or created), but they contain
code for manipulating the processor,
memory, etc as opposed to just being
music data. Not only does this waste
CPU time, but its also difficult to
switch back and forth between
executing Shredz64 code and executing
SID code. My solution for now was to
hack the libsidplay library on my
Linux box, and intercept any memory
writes to the virtual SID chip
(0xD4XX) and dump the address and the
value to a binary file, along with the
relative time the memory write was
made. E.g. I play a SID file on my
computer, and in addition to playing
it it dumps all the SID chip data to a
file. Shredz64 then uses that file as
its music data. Actually, I didn't
implement the timing tonight, but I
did manually set the timing inside the
game just to test it out, and it
played the music pretty accurately!
Very promising for first try. I do
need to compress the files somehow, at
least look for repeating sequences,
since they get pretty big. Hopefully
filesize won't end up being an
impossible issue. But hearing music
out of the game for the first time
tonight sure was awesome!
3/26/07 I added the applause meter
tonight that shows how well you're
doing overall and how close you are to
failing. As can be seen, its a
vertical bar separated into three
sections, filling from bottom to top.
When doing well, the bar fill is
green, when okay its yellow, and when
bad its red. When empty its game over!
(Though I don't have a game over yet).
Your applause increases when you
correctly strum a note, and decreases
if you miss a note or incorrectly
strum. I also fixed up some bugs
recognizing correct strumming, and
separated the code out into multiple
files now that things are getting
bigger. Next up is reading note and
song data from files, and then the SID
converter plugin!
3/21/07 I snuck some hours in
yesterday before I went to the dentist
and worked on things. Shredz64 can now
take a (static) list of button data
(e.g. buttons to be pressed at what
time and in what order) and correctly
show it on the screen. For instance, I
can encode data that says "A green
button should be pressed at 00:00:10,
00:00:20, and 00:00:45, a red button
should be pressed at 00:00:10,
00:00:30, etc, and it will correctly
show and scroll the sprites on screen.
It will also detect if you strum the
correct chords at the correct times
and increase your score upon success.
I've also added a "Shredocity" meter
that mirrors the functionality of Star
Power in Guitar Hero for the
Playstation. I will soon be adding a
crowd meter that will determine how
well you're playing..
The Shredocity meter is a bit chunky
looking right now, I'll be thinning
out the graphics. Overall, things are
going really well. The framework of
all the controls and graphics are
pretty much done, there is only the
big project left of incorporating SIDs
in as the source of the music, and the
smaller task of reading the song data
from files on disk. SID music is
ironically incredibly hard to work
with on a C64 since its just machine
code that was ripped from some other
program, but I have plans
incorporating SID plugins for XMMS to
convert it over to a different usable
format. More on that later after some
code has been written.
3/4/07 Well, I got a few more things
done. As I mention on the Shredz64
page, graphics are simple and confined
to PETSCII and sprites right now, no
high res stuff. I want to save all the
processing power I can for good
response and music. I'll tweak up the
sprites later on, but for now this is
fine. Anyway - I have the fret board
showing, and button indicators at the
bottom. They do respond to the guitar
controller now, so if you press a
button on the guitar it will light up
on the screen. I have the strum bar
just playing a beep out of the C64
right now to let me know its working.
As can be seen, I also did a simple
sprite to represent the note/button
as it slides down the fret board.
3/2/07 I had a day off from work
today, though I ended up sleeping
pretty late and not getting everything
done I wanted to. I did, however,
build a PC64 cable and get cbmlink
installed and running on my Debian
box. Now I can successfully read/write
files/disk images to my C64 from my
PC, read/write memory, remotely
execute programs, run disk commands,
etc. The reason this is related to
Shredz64 is now I can actually test it
on a real C64 with the controller as
opposed to only the emulator with no
controller. The cable isn't too
exciting looking to no pictures, but
it does operate on a 4-bit parallel
connection between the user port and
the parallel port, as opposed to a
serial connection.
2/27/07 Well, I updated the webpage a
bit. Nothing too fancy, but I wanted
to clean it up a bit so some sections
were separated out. This page will
still serve as a log of things I'm
doing.
In technical news, I've got some
graphical routines done and have a
fretboard on the screen with scrolling
buttons. Screenshots later when I have
something a little more to show.
2/21/07 Lots of good work and news
going on with this project, I figured
it was about time to actually update
this page with what's going on.The
soldered prototype for the PSX -> C64
adapter is now done, as can be seen
here:
The converter now does the following:
1. Determines whether a normal
controller is plugged in or a guitar
controller, and maps buttons
accordingly
2. Turns on analog mode for guitar
controller and successfully reads
whammy bar. (Updates later about
getting this working for all those
interested)
3. Maps Strum up, Strum down, and
guitar lift up to static values on one
of the POT lines, which allows the C64
to receive ALL information from the
guitar (except start and select
button)
4. Allows button macros to be
programmed onto the R1/R2/L1/L2
buttons in controller mode, up to 127
button sequences PER macro
5. If the user selects analog mode on
a normal controller, it will map the
left analog stick to the normal
digital directions
6. And converts all buttons
successfully of course.
Continued in PART 2